using MeetingManagement.Domain.Entities;

namespace MeetingManagement.Domain.Events
{
    public class MeetingCancelledEvent : DomainEvent
    {
        public Guid MeetingId { get; private set; }
        public string Title { get; private set; }
        public Guid OrganizerId { get; private set; }
        public string CancellationReason { get; private set; }

        private MeetingCancelledEvent() { }

        public static MeetingCancelledEvent Create(Meeting meeting, string cancellationReason = null)
        {
            return new MeetingCancelledEvent
            {
                MeetingId = meeting.Id,
                Title = meeting.Title,
                OrganizerId = meeting.OrganizerId,
                CancellationReason = cancellationReason
            };
        }
    }
}
